/*************************************
Copyright 2011 Chinua Iloabachie, Pradnya Khutafale, Siyi Liu, Junichi Suzuki, and The University of Massachusetts, Boston (http://code.google.com/p/tabletuml/)


Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 
*************************************/




package touchMe.baseClass;

 

import android.graphics.PointF;

public class Constants {
	
	public static final int NONE = 0;
	public static final int DRAG = 1;
	public static final int ZOOM = 2;
	public static int explorerMode;
	public static int association=3;
	public static final int NEW=0;
	public static final int OPEN=1;
	public static final int SAVE=2;
	public static final int SAVEAS=3;
	public static final int EXIT=4;
	public static final int EDITMODE=5;
	public static final int RELATIONMODE=6;
	public static final int INHERITANCE_RELATIONMODE=7;
	public static final int IMPLEMENTATION_RELATIONMODE=8;
	public static final int RELATION_DRAWN=9;
	public static final int ADDELEMENT=1;
	public static final int UPDATEELEMENT=2;
	public static final int DELETEELEMENT=3;
	public static final int LOADELEMENT=4;
	public static final int abc = 1;
	public static int diagramState=0;
	public static final int defaultZoomLevel=10;
	public static final int delta = 15;
	
	public static final String TAG="TouchMe";
	public static final String  classType="com.umlet.element.base.Class";
	public static final String  usecaseType="com.umlet.element.base.UseCase";
	public static final String  actorType="com.umlet.element.base.Actor";
	public static final String  relationType="com.umlet.element.base.Relation";
	public static final String panelAtt="Package::FatClass\n{Some Properties}\n--\n-id: Long\n_-ClassAttribute: Long_\n--\n"+
	"#Operation(i: int): int";
	public static final String relaAtt="0..n;0..n;";
	public static final String useCasePanelAtt="UseCase";
	public static final String actorAtt="Actor";
	//public static final String relationPanelAttr="lt=<<-<";
	
	public static String relationPanelAttr="1..n;1..n";
	public static final String inheritPanelAttr="lt=<<-";
	public static final String implementPanelAttr="lt=<<.";
	public static final String helpUrl="http://www.cs.umb.edu/~chinua/touchMe/help";
	
	// this method is taken from UmLet - Constants class
	public static PointF normalize(PointF p, int pixels) {
		PointF ret = new PointF();
		double d = Math.sqrt(p.x * p.x + p.y * p.y);
		ret.x = (int) (p.x / d * pixels);
		ret.y = (int) (p.y / d * pixels);
		return ret;
	}
}
